package com.hns.phone.maintenance.web;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hns.can.common.service.CommonInitParamService;
import com.hns.can.common.vo.CommonParamsVo;
import com.hns.can.common.web.BaseController;
import com.hns.can.master.entity.CommCarCurrentLoInfoEntity;
import com.hns.frame.util.ResponseUtil;
import com.hns.phone.maintenance.service.PhoneOperationManageService;

/**
 * 
 * @版权：HNS 版权所有 (c) 2013
 * @author:Lan
 * @version Revision 1.0.0
 * @email:763836737@qq.com
 * @see:
 * @创建日期：2015-6-17
 * @功能说明：线路参数设置
 * @begin
 * @修改记录:
 * @修改后版本          修改人      	修改内容
 * @2015-6-17  	        Lan        	创建
 * @end
 */
@Controller
@RequestMapping("/api/phoneOperationManage")
public class PhoneOperationManageController extends BaseController {
    
    @Autowired
    private PhoneOperationManageService phoneOperationManageService;
    @Autowired
    private CommonInitParamService commonInitParamService;
    
    
    /**
     * @param params
     * @param request
     * @param response
     * @author:zhangy
     * @email:zhangyu2222z@sina.cn
     * @创建日期:2015年9月7日
     * @功能说明：获取线路实时路况
     */
    @RequestMapping("/getRealTimeTrafficStatus")
    @ResponseBody
    public Object getRealTimeTrafficStatus(CommonParamsVo params,
    		HttpServletRequest request, HttpServletResponse response){
    	commonInitParamService.setOrgIds(params, null, this.getPhoneCurrentUser(), null);
    	List<CommCarCurrentLoInfoEntity> list = phoneOperationManageService.getRealTimeTrafficStatus(params);
    	return this.getReturnResult(list);
    }
    
}
